#include <stdio.h>

int main ()
{

    int number = 0 , sum = 0 , a = 0 , b = 0 , c = 0 , d = 0 ;

    scanf("%d" , &number) ;

    // 简单地建立四个判断函数即可

    if (number % 2 == 0)
    {

        sum++ ;

    }

    if (4 <= number && number <= 12)
    {

        sum++ ;

    }

    if (sum == 2)
    {

        a = 1 ;

    }

    if (sum == 1 || sum == 2)
    {

        b = 1 ;

    }

    if (sum == 1)
    {

        c = 1 ;

    }

    if (sum == 0)
    {

        d = 1 ;

    }

    printf("%d %d %d %d" , a , b , c , d) ;

    return 0 ;

}